<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Index extends Admin_Controller{
	
	public function __construct(){
		parent::__construct();
		$this->loadData('controllerName',$this->router->fetch_class());
	}
	
	public function index(){
		$this->load->model('Channel_Model');
		$this->load->model('Customers_Model');
		$this->load->model('Orders_Model');
		$this->load->model('Contacts_Model');
		$this->load->model('Advertise_Model');
		$this->loadData('countchannel', $this->Channel_Model->countChannel());
		$this->loadData('countcustomer', $this->Customers_Model->countCustomer());
		$this->loadData('countorders', $this->Orders_Model->countTotalOrders());
		$this->loadData('countordersnew', $this->Orders_Model->countOrders(0));
		$this->loadData('countcontact', $this->Contacts_Model->countContact(1));
		$this->loadData('countads', $this->Advertise_Model->countAds());
		$this->headTitle('Bảng điều khiển - Admin Panel');
		$this->loadView('administrator/index/index');
	}
	
}